package com.mmtech.edb.data.handler.impl;

import com.mmtech.edb.data.config.DataSendConfig;
import com.mmtech.edb.data.handler.DataHandler;
import com.mmtech.edb.data.model.User;
import com.mmtech.edb.data.service.DataService;
import com.mmtech.mail.service.MailService;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
import org.thymeleaf.TemplateEngine;

import java.io.IOException;

/**
 * 发送数据
 *
 * @author wuchong
 * @since 2019-07-15 15:02
 **/
@Profile("dev")
@Component
@Slf4j
public class DevDataHandlerImpl extends DataHandlerImpl {

    public DevDataHandlerImpl(DataService<User> dataService, MailService mailService, DataSendConfig dataSendConfig, TemplateEngine templateEngine) {
        super(dataService, mailService, dataSendConfig, templateEngine);
    }

    /**
     * 处理数据
     */
    public void process() throws IOException, InvalidFormatException {
        super.process();
        log.info("数据处理成功");
    }
}
